# -*- coding: utf-8 -*-
"""
Created on Sun Sep  8 16:57:03 2019

@author: ASUS
"""

import os
import sys
import datetime

head='#'+'-'*20+'\n'+\
     '#Function description:\n'+\
     '#'+'-'*20+'\n'+\
     '#Author:litchi\n'+\
     '#QQ:200000000\n'+\
     '#Email:litchi@qq.com\n'+\
     '#'+'-'*20+'\n'
desFile = sys.argv[1]#目标文件名
if os.path.exists(desFile) or not desFile.endswith('.py'):
    print('%s already exist or is not a Python code file.!'%desFile)
    sys.exit()
fp=open(desFile,'w')
today=str(datetime.date.today())
fp.write('#-*-coding:utf-8-*-\n')
fp.write('Filename:'+desFile+'\n')
fp.write(head)
fp.write('#Date:'+today+'\n')
fp.write('#'+'-'*20+'\n')
fp.close()
#没弄懂怎么用